#include "gtest/gtest.h"
#include "thread_pool.hpp"
#include "logger.hpp"
 
using namespace rsv;

#include "producer_consumer.hpp"

class ProducerConsumerTest : public ::testing::Test {
protected:
    ProducerConsumer pc;
};

TEST_F(ProducerConsumerTest, ProducerTest) {
    pc.producer();
    EXPECT_EQ(pc.getQueueSize(), 5);
}

TEST_F(ProducerConsumerTest, ConsumerTest) {
    pc.producer();
    pc.consumer();
    EXPECT_EQ(pc.getQueueSize(), 0);
}
TEST_F(ProducerConsumerTest, RunTest) {
    EXPECT_NO_THROW(pc.run());
}